<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>class/style</title>
    <script src="../vue.global.js"></script>
    <style>
        .red{
            color:red;
        }
        .font-big{
            font-size: 50px;
        }
    </style>
</head>
<body>

<div id="App">
    <span v-bind:class="className">我草</span>
    <br/>
    <span v-bind:class="{red:isR,'font-big':isBig}">我干</span>
    <br/>
    <span v-bind:class="classObj">我干</span>
    <br/>
    <span v-bind:class="classObj3">我干</span>
    <br/>
    <span v-bind:class="[className,bigFont]">我干</span>
    <br/>
    <span v-bind:style="{color:className}">我干style</span>
</div>


<script>



    const App = {

        data(){
            return {
                counter:10,
                className:"red",
                isR:true,
                isBig:true,
                classObj:{
                    red:true,
                    'font-big':true,
                },
                bigFont:"font-big"
            }
        },
        computed:{
            classObj3:{
                get(){
                    return {
                        red:true,
                        'font-big':true,
                    }
                }
            }
        }
    };

    const vm = Vue.createApp(App).mount("#App")


</script>
</body>
</html>